//写一个函数，实现把 字符里的数字 转换 成 整型 的 要求


int atoi (char *s)
{
    int result=0;
    int sign = 1;
    
    while( *s == '-' )
    {
        sign = -1;
    }
    
    
    while( *s != '\0' )
    {
        if( *s >= '0' && *s <= '9')
        
       { result = result * 10 + *s- '0' ;}
        
        s++;
    }
    return sign * result;
}



#include<stdio.h>

int main()
{
    char *s = "2434";
    int number = 0;
    number = atoi(s);

    printf("%d\n",number);

    return 0;
}